home *** CD-ROM | disk | FTP | other *** search
- Path: xara.net!SoNet!usenet
- From: Rob Catling <cats@aladdin.co.uk>
- Newsgroups: comp.lang.c
- Subject: casting const
- Date: 28 Mar 1996 22:39:32 GMT
- Organization: RPC Software
- Message-ID: <4jf4f5$3aa@news.aladdin.co.uk>
- NNTP-Posting-Host: 193.119.120.81
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.22 (Windows; I; 16bit)
-
-
- I was wondering why you could pass a char * value as an argument to
- func(const char *) with no problem, but passing char ** value to
- func(const char **) gives a compiler warning (unless you cast it).
-
- The comp.lang.c FAQ was the only place that told me why I had to cast a function
- argument to (const **), however I'm still wondering:
-
- 1) how was this pieced together from the references? ANSI C ref and H&S failed
- to illuminate this for me.
-
- 2) is this really an elegant language feature or a practical kludge ?
-
- - Rob
-
-